package org.eae.eldf.service.module.impl;

import java.util.List;
import org.eae.eldf.dao.module.IModulePurviewDao;
import org.eae.eldf.dto.module.ModulePurviewQueryDto;
import org.eae.eldf.entity.module.ModuleMenu;
import org.eae.eldf.entity.module.ModulePurview;
import org.eae.eldf.framework.pager.Pagination;
import org.eae.eldf.framework.service.BaseServiceImpl;
import org.eae.eldf.service.module.ModulePurviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ModulePurviewServiceImpl extends BaseServiceImpl<ModulePurview>
		implements ModulePurviewService {

	

	private IModulePurviewDao modulePurviewDao;
	
	@Autowired
	public void setModulePurviewDao(IModulePurviewDao modulePurviewDao) {
		this.modulePurviewDao = modulePurviewDao;
		this.dao=modulePurviewDao;
	}




	// 通过模块权限名称模糊查找模块权限
	@Override
	public Pagination<ModulePurview> pageModulePurviewList(
			Pagination<ModulePurview> pager, ModulePurviewQueryDto modulePurviewQueryDto) {
		return modulePurviewDao.pageModulePurviewList(pager, modulePurviewQueryDto);
	}



	@Override
	public Pagination<ModulePurview> pageModuleListByMid(
			Pagination<ModulePurview> pager, long moduleMenuId) {
		return modulePurviewDao.pageModuleListByMid(pager, moduleMenuId);
	}




//	@Override
//	public List<ModuleRolePurviewDto> queryListByProdcategoryId(Long categoryId) {
//		return modulePurviewDao.queryListByProdcategoryId(categoryId);
//	}




	/* (non-Javadoc)
	 * @see  通过模块菜单列表查询模块权限列表
	 */
	@Override
	public List<ModulePurview> queryByMenuList(List<ModuleMenu> list) {
		
		return modulePurviewDao.queryByMenuList(list);
	}









}
